﻿using System;
using System.Diagnostics;
using Microsoft.Xna.Framework;
using Rocuna.Log;
using Rocuna.Core.Extensions;

namespace Rocuna.GameEngine
{
    /// <summary>
    /// Base Game class to start new Game.
    /// </summary>
    public class RocunaEngine : Game
    {

        protected override void Initialize()
        {
            base.Initialize();
            LogManager.StartEngine();
            Services.AddService(typeof(LogManager), LogManager.Instance);
            var logManager = this.GetService<LogManager>();
            logManager.DefaultLogger.AddTraceListener(new TextWriterTraceListener(Console.Out));
            logManager.SetLoggerLevel(LogDetailsLevel.Low);
            logManager.Warn("Start");
        }
    }
}